package com.xy.service.impl;

import com.xy.dao.PermissionDao;
import com.xy.model.Permission;
import com.xy.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Set;

@Service
@Transactional

public class PermissionServiceImpl implements PermissionService {

    @Autowired
    PermissionDao permissionDao;
    public Set<String> getPermission(Integer userid) {
        return permissionDao.getPermission(userid);
    }

    public List<Permission> getPermissionByList(Integer userid) {
        return permissionDao.getPermissionByList(userid);
    }

    public List<Permission> getPermissionAll() {
        return permissionDao.getPermissionAll();
    }
}
